package com.autohammal;

import java.util.List;

import com.autohammal.ui.frame.items.ConfigurationItem;
import com.autohammal.ui.frame.items.ItemDescriptor;
import com.autohammal.Monitor;
/**
 * Target Interface
 * 
 * @author dailey_dai Mar 3, 2011
 */
public interface ITarget {
	/**
	 * get all task
	 * 
	 * @return
	 */
	List<ITask> getTasks();

	/**
	 * create some task
	 * 
	 * @return
	 */
	List<ITask> createTask();

	/**
	 * clear finished task
	 */
	void clear();

	boolean remove(ITask task);

	void setMonitor(final Monitor monitor);

	Monitor getMonitor();

	
	/**
	 * get configuration item
	 * @param key
	 * @return
	 */
	Object getConfigurationItem(String key);

	void setConfigurationItem(String key, Object value);

	ItemDescriptor[] configurationDescriptors();
	
	ConfigurationItem[] getConfiguration();
	
	void setConfiguration(ConfigurationItem[] ciArray);
	/**
	 * get parameter
	 * 
	 * @param key
	 * @return
	 */
	Object getInputItem(String key);

	Object getOutputItem(String key);
	
	ItemDescriptor[] inputDescriptors();

	/**
	 * set parameter
	 * 
	 * @param key
	 * @param value
	 */
	void setInputItem(String key, Object value);

	void setOutputItem(String key, Object value);
	
	ItemDescriptor[] outputDescriptors();
}
